package com.project.nimsen.weixin.bean;

import org.apache.commons.lang3.StringUtils;
import org.dom4j.Element;

/**
 * 带参数二维码信息
 * */
public class EventTicketRMsg extends EventKeyRMsg {
	private String ticket;//二维码的ticket

	public String getTicket() {
		return ticket;
	}

	public void setTicket(String ticket) {
		this.ticket = ticket;
	}

	protected String info() {
		StringBuffer info = new StringBuffer(super.info());
		info.append("<Ticket><![CDATA[").append(this.getTicket()).append("]]></Ticket>");
		return info.toString();
	}

	protected void fullchildProperty(Element root) {
		super.fullchildProperty(root);
		String str_ticket = root.elementText("Ticket");
		if(StringUtils.isNotBlank(str_ticket))
			this.setTicket(str_ticket);
	}
}
